// Promise 生成器
function load() {
    return new Promise(function(resolve, reject) {
        resolve('success');
    })
}

run(function *() {
    const result = yield load();
    console.log(result);
})

const p = new Promise((resolve, reject) => {
    resolve(Promise.reject('error'))
})